package com.example.wecomservice.service;

import com.example.wecomservice.pojo.dto.AccessTokenDto;
import com.example.wecomservice.pojo.dto.OauthDto;
import com.example.wecomservice.pojo.dto.ReceiveDto;

import java.io.InputStream;

/**
 * @author Jamin
 * @Date 2023/2/3 11:06
 */
public interface IWeComService {

    /**
     * 获取第三方应用凭证
     */
    AccessTokenDto getSuiteAccessToken(String suiteTicket);

    String weComVerify(String msgSignature, String timeStamp, String nonce, String echoStr);

    String weComCommand(String msgSignature, String timeStamp, String nonce, InputStream in);

    String weComDecryptMsg(String msgSignature, String timeStamp, String nonce, String postData, ReceiveDto receive);

    OauthDto oauth(String code, String state);

    /**
     * 获取授权用户基本信息
     */
    String getWeComUserInfo(String code, String suiteAccessToken);

    /**
     * 获取授权凭证
     */
    String getAccessToken(String authCorpId);
}
